<?php

ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
defined('YII_ENV_DEV') or define('YII_ENV_DEV', true);

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';

yii\base\Event::on('*', '*', function ($event) {
    // echo('trigger event: ' . $event->name . '->' . get_class($event->sender) . '<br/>');
});

$config = require __DIR__ . '/../config/web.php';

$config['class'] = 'yii\web\Application';
$app = Yii::createObject($config);
$app->run();
// (new yii\web\Application($config))->run();
